package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo2 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos= new FileOutputStream("fos.txt");
        String line="我我我我为无，呜呜呜呜";
        byte[]data=line.getBytes(StandardCharsets.UTF_8);
        fos.write(data);
        fos.write(",鹅鹅鹅鹅鹅鹅，吞吞吐吐跳跳糖".getBytes(StandardCharsets.UTF_8));
        System.out.println("完毕");
        fos.close();
    }
}
